<?php
/**
 * @Copyright Copyright (C) 2010-2012
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 + Created by:          Webit Solution
 * Company:		Webit Solution
 + Contact:		www.webits.asia, developer@webits.asia
 * Created on:	Mar 21, 2012
 ^
 + Project: 		WRecruit
 * File Name:	views/employer/tmpl/myjobs.php
 ^ 
 * Description: template view for my jobs
 ^ 
 * History:		NONE
 ^ 
 */
 
 defined('_JEXEC') or die('Restricted access');
 
 global $mainframe;
 $document =& JFactory::getDocument();
 $document->addStyleSheet('components/com_wrecruit/css/'.$this->config['theme']);
$link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=myjobs&Itemid='.$this->Itemid;

?>
	 
<script language="Javascript">
    function confirmdeletejob(){
        return confirm("<?php echo JText::_('JS_ARE_YOU_SURE_DELETE_THE_JOB'); ?>");
    }
</script>

<?php if ($this->config['offline'] == '1'){ ?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	<?php echo $this->config['title']; ?></td></tr>
	<tr><td height="25"></td></tr>
	<tr><td class="wrecruitmsg">
		<?php echo $this->config['offline_text']; ?>
	</td></tr>
</table>	
<?php }else{ ?>

<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	
		<?php echo $this->config['title']; ?>
	</td>
	</tr>
	<tr><td height="23"></td></tr>
	<?php if ($this->config['cur_location'] == 1) {?>
	<tr><td class="curloc">
		<?php echo JText::_('JS_CUR_LOC'); ?> : <?php echo JText::_('JS_MY_JOBS'); ?>
	</td></tr>
	<?php } ?>
	<tr class="nowrap"><td >
		<?php 
			if (sizeof($this->employerlinks) != 0){
				echo '<div id="toplinks"><ul>';
				foreach($this->employerlinks as $lnk)	{ ?>
					<span <?php if($lnk[2] == 1)echo 'class="first"'; elseif($lnk[2] == -1)echo 'class="last"';  ?>>
						<a href="<?php echo $lnk[0]; ?>"> <?php echo $lnk[1]; ?></a>
					</span>
				<?php }
				echo '<ul></div>';			
			}
		?>
	</td></tr>	
	<tr><td height="3"></td></tr>
	<tr><td class="<?php echo $this->theme['heading']; ?>" align="center">
		<?php echo JText::_('JS_MY_JOBS'); ?>
	</td></tr>
	<tr><td height="3"></td></tr>
</table>


<?php
if($this->jobs){

if ($this->userrole->rolefor == 1) { // employer

	if ($this->sortlinks['sortorder'] == 'ASC')
		$img = "components/com_wrecruit/images/sort0.png";
	else
		$img = "components/com_wrecruit/images/sort1.png";

?>

<form action="index.php" method="post" name="adminForm">
	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
		<tr  class="<?php echo $this->theme['sortlinks']; ?>" valign="middle">
			<td valign="center" class="<?php echo $this->theme['sortlinks']; ?>" align="center" ><strong><?php echo JText::_('JS_SORT_BY'); ?> :</strong> 
				&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['title']; ?>"><?php echo JText::_('JS_TITLE'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'title') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['category']; ?>"><?php echo JText::_('JS_CATEGORY'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'category') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['jobtype']; ?>"><?php echo JText::_('JS_JOBTYPE'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'jobtype') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['jobstatus']; ?>"><?php echo JText::_('JS_JOBSTATUS'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'jobstatus') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['company']; ?>"><?php echo JText::_('JS_COMPANY'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'company') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['country']; ?>"><?php echo JText::_('JS_COUNTRY'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'country') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['salaryrange']; ?>"><?php echo JText::_('JS_SALARY_RANGE'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'salaryrange') { ?> <img src="<?php echo $img ?>"> <?php } ?>
				&nbsp;|&nbsp;<strong><a class="<?php echo $this->theme['sortlinks']; ?>" href="<?php echo $link?>&sortby=<?php echo $this->sortlinks['created']; ?>"><?php echo JText::_('JS_DATEPOSTED'); ?></a></strong><?php if ($this->sortlinks['sorton'] == 'created') { ?> <img src="<?php echo $img ?>"> <?php } ?>
			</td>
		</tr>
		</table>
		<?php 
    if($this->listjobconfig['lj_joblistingstyle'] == 'classic'){ ?>
	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
		<?php $days = $this->config['newdays'];
		$isnew = date("Y-m-d H:i:s", strtotime("-$days days"));
		$tdclass = array($this->theme['odd'], $this->theme['even']);
		$isodd =1;
                $istr=1;
		foreach($this->jobs as $job)	{ 
			$isodd = 1 - $isodd; ?>
			<tr class="<?php echo $tdclass[$isodd]; ?>"> <td colspan="5">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr><td height="3"></td></tr>
                                <?php if($this->listjobconfig['lj_title']=='1'){ ?>

					<tr>
						<td >&nbsp;<strong><?php echo JText::_('JS_TITLE'); ?>	</strong></td>
						<td ><?php echo $job->title;
						if ($job->created > $isnew)
							echo "<font color='red'> ".JText::_('JS_NEW')." </font>";
						?></td>
				<?php }?>
				<?php if($istr){ echo '</tr><tr>';   $istr = 2;} ?>
				<?php	if($this->listjobconfig['lj_category'] == '1') { $istr++ ; ?>

						<td >&nbsp;<strong><?php echo JText::_('JS_CATEGORY'); ?>	</strong></td>
						<td ><?php echo $job->cat_title; ?></td>
						
				<?php	} ?>
				<?php if($istr == 4){ echo '</tr><tr>';   $istr = 2;} ?>
				<?php	if($this->listjobconfig['lj_jobtype'] == '1') { $istr++ ; ?>
						<td  width="20%">&nbsp;<strong><?php echo JText::_('JS_JOBTYPE'); ?>	</strong></td>
						<td  width="30%"><?php echo $job->jobtypetitle; ?></td>
				<?php } ?>
				<?php if($istr == 4){ echo '</tr><tr>';   $istr = 2;} ?>
					<?php if($this->listjobconfig['lj_jobstatus'] == '1')   { $istr++; ?>

						<td  width="23%">&nbsp;<strong><?php echo JText::_('JS_JOBSTATUS'); ?>	</strong></td>
						<td  width="27%"><?php echo $job->jobstatustitle; ?></td>
				<?php } ?>
				<?php if($istr == 4){ echo '</tr><tr>';   $istr = 2;} ?>
					<?php if($this->listjobconfig['lj_company'] == '1') { $istr++; ?>
						<td >&nbsp;<strong><?php echo JText::_('JS_COMPANY'); ?>	</strong></td>
						<td >
									<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_company&md='.$job->companyid.'&Itemid='.$this->Itemid; ?>
							<a href="<?php echo $link?>"><strong><?php echo $job->companyname; ?></strong></a>
						</td>
					<?php	} ?>
				<?php if($istr == 4){ echo '</tr><tr>';  $istr = 2;} ?>
					<?php if($this->listjobconfig['lj_companysite'] == '1') { $istr++; ?>

						<td >&nbsp;<strong><?php echo JText::_('JS_COMPANYURL'); ?>	</strong></td>
						<td ><a class="jplnks" href='<?php echo $job->url; ?>' target='_blank'><?php echo $job->url; ?></a></td>
				<?php	} ?>
				<?php if($istr == 4){ echo '</tr><tr>';  $istr = 2;} ?>
				<?php	if($this->listjobconfig['lj_country'] == '1') {  $istr++; ?>
						<td >&nbsp;<strong><?php echo JText::_('JS_COUNTRY'); ?>	</strong></td>
						<td ><?php echo $job->countryname; ?></td>
				<?php	} ?>
				<?php if($istr == 4){ echo '</tr><tr>';  $istr = 2;} ?>
				<?php	  if($this->listjobconfig['lj_salary'] == '1') { $istr++; ?>

						<?php if ($job->jobsalaryrange != 0){ ?>
									<td >&nbsp;<strong><?php echo JText::_('JS_SALARY_RANGE'); ?>	</strong></td>
									<td ><?php $salary = $this->config['currency'] . $job->rangestart . ' - ' . $this->config['currency'] . $job->rangeend . ' /month';
									echo $salary; ?></td>
							<?php  
							} ?>
				<?php	} ?>
			<?php if($istr == 4){ echo '</tr><tr>';   $istr = 2;} ?>
					<?php if($this->listjobconfig['lj_created'] == '1') { $istr++; ?>
						<td >&nbsp;<strong><?php echo JText::_('JS_DATEPOSTED'); ?>	</strong></td>
						<td ><?php echo date($this->config['date_format'],strtotime($job->created)); ?></td>
					<?php	} ?>
					<?php if($istr == 4){ echo '</tr><tr>';  $istr = 2;} ?>
					<?php if($this->listjobconfig['lj_noofjobs'] == '1') { $istr++; ?>

						<?php if ($job->noofjobs != 0){ ?>
						<td >&nbsp;<strong><?php echo JText::_('JS_NOOFJOBS'); ?>	</strong></td>
						<td ><?php echo $job->noofjobs; ?></td>
						<?php } ?>
					<?php } ?>
				<?php if($istr == 4) echo '</tr>'; else echo '<td></td></tr>'; ?>
					<tr>
                                            <td colspan="4" align="center">
                                                <table><tr><td height="1"></td></tr><tr>
						
                                                    <td  align="center">
                                                            <?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=formjob&Itemid=4&bd='.$job->id.'&Itemid='.$this->Itemid; ?>
                                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_EDIT'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/edit.png" /></a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_job&vj=1&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_VIEW'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/view.png" /></a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <?php $link = 'index.php?option=com_wrecruit&c=wrecruit&task=deletejob&Itemid=4&bd='.$job->id.'&Itemid='.$this->Itemid; ?>
                                                            <a href="<?php echo $link?>" class="" onclick=" return confirmdeletejob();"  title="<?php echo JText::_('JS_DELETE'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/delete.png" /></a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <?php if ($job->status == '0') {?>
                                                                    <?php echo '<span class="jobstatusmsg">'.JText::_('JS_STATUS') .' : ' . JText::_('JS_APPROVALWAITING').'</span>'; ?>
                                                            <?php }elseif ($job->status == '-1') {?>
                                                                    <?php echo '<span class="jobstatusmsg">'.JText::_('JS_STATUS') .' : ' . JText::_('JS_NOTAPPROVED').'</span>'; ?>
                                                            <?php }elseif ($job->status == '1') {?>
                                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&task=addtogoldjobs&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_ADD_TO_GOLD_JOBS'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/add_gold.png" /></a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&task=addtofeaturedjobs&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_ADD_TO_FEATURED_JOBS'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/add_featured.png" /></a>
                                                            &nbsp;&nbsp;&nbsp;
                                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=job_shortlistcandidates&bd='.$job->id.'&Itemid='.$this->Itemid); ?>
                                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_SHORT_LIST_CANDIDATES'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/shortlist.png" /></a>
                                                        </td>                                                    <?php } ?>
                                                </tr></table>

                                             </td>
					</tr>
					<tr><td height="3"></td></tr>
				</table>	
			</td></tr>
		<?php 
		}
		?>		
	</table>
<?php } else if($this->listjobconfig['lj_joblistingstyle'] == 'july2011'){ ?>
	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
		<?php
		$tdclass = array($this->theme['odd'], $this->theme['even']);
		$days = $this->config['newdays'];
		$isnew = date("Y-m-d H:i:s", strtotime("-$days days"));
		//$tdclass = array("odd", "even");
		$isodd =1;
		$istr=1;
		if ( isset($this->jobs) ){
		foreach($this->jobs as $job) {
                    $comma = "";
                    $isodd = 1 - $isodd; ?>
                    <tr height="20" class="<?php echo $tdclass[$isodd]; ?>" > <td colspan="5">
                        <table  cellpadding="0" cellspacing="0" border="0" width="100%">
                            <div class="wrecruit_title" >
                                <h1><span class="wrecruit_titlestyle"><?php if($this->listjobconfig['lj_title']=='1') { ?>
                                    <?php echo $job->title; ?>
                                <?php }?>
                                </span></h1>
                            </div>
                            <div class="wrecruit_applynow"><span> <?php echo ""; ?></span>
                            </div>
                           <?php  if ($job->created > $isnew) { ?>
                                <div class="wrecruit_status">
                                    <span class="wrecruit_new "><span></span></span>
                                </div>
                            <?php } ?>
                            <div class="wrecruit_divsubcontainer">
                                    <div class="wrecruit_address" >
                                    <?php if($this->listjobconfig['lj_country'] == '1') {   ?>
                                    <strong><?php echo JText::_('JS_LOCATION'); ?></strong>
                                        <?php if($job->countryname != '') { ?>
                                            <?php echo $comma.$job->countryname; ?>
                                    <?php } ?>
                                    <?php } ?>
                                    </div>
                                    <div class="wrecruit_leftdiv" >
                                            <?php if($this->listjobconfig['lj_description'] == '1') {  ?>
                                                <?php
                                                $lenght = $this->listjobconfig['lj_shortdescriptionlenght'];
                                                $des = $job->description." ";
                                                $des = substr($des,0,$lenght);
                                                $des = substr($des,0,strrpos($des,' '));
                                                $des = $des."...";
                                                 echo $des;
                                                 ?>
                                            <?php }else echo ' .' ;?>
                                    </div>
                                </div>
                                <div class="wrecruit_rightdiv" >
                                        <?php if($this->listjobconfig['lj_salary'] == '1') {  ?>
                                            <?php $salary = $this->config['currency'] . $job->rangestart . ' - ' . $this->config['currency'] . $job->rangeend . ' /month ' ;
                                            if($job->rangestart){
                                                echo $salary.'</br>';
                                                } ?>
                                        <?php } ?>
                                        <?php if($this->listjobconfig['lj_category'] == '1') {   ?>
                                            <?php echo $job->cat_title.'</br>'; ?>
                                        <?php } ?>
                                        <?php if($this->listjobconfig['lj_company'] == '1') {  ?>
                                                <?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_company&vm=5&md='.$job->companyid.'&jobcat='.$job->jobcategory.'&Itemid='.$this->Itemid; ?>
                                                <a href="<?php echo $link?>"><strong><?php echo $job->companyname.'</br>'; ?></strong></a>
                                        <?php } ?>
                                        <?php if($this->listjobconfig['lj_jobtype'] == '1') {   ?>
                                                <?php echo $job->jobtypetitle; ?>
                                                <?php if($this->listjobconfig['lj_jobstatus'] == '1')   {  ?>
                                                    <?php echo $job->jobstatustitle.'</br>'; ?>
                                                <?php } ?>
                                        <?php } ?>
                                        <?php if($this->listjobconfig['lj_noofjobs'] == '1') {  ?>
                                            <?php if ($job->noofjobs != 0){ ?>
                                                <strong><?php echo JText::_('JS_NOOFJOBS'); ?></strong>
                                                <?php echo $job->noofjobs.'</br>'; ?>
                                            <?php } ?>
                                        <?php } ?>
                                        <?php if($this->listjobconfig['lj_created'] == '1') {    ?>
                                            <?php echo date($this->config['date_format'],strtotime($job->created)); ?>
                                        <?php } ?>
                                </div>
                            <div class="wrecruit_myjobsicons">
                                            <?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=formjob&Itemid=4&bd='.$job->id.'&Itemid='.$this->Itemid; ?>
                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_EDIT'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/edit.png" /></a>
                                            &nbsp;&nbsp;&nbsp;
                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_job&vj=1&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_VIEW'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/view.png" /></a>
                                            &nbsp;&nbsp;&nbsp;
                                            <?php $link = 'index.php?option=com_wrecruit&c=wrecruit&task=deletejob&Itemid=4&bd='.$job->id.'&Itemid='.$this->Itemid; ?>
                                            <a href="<?php echo $link?>" class="" onclick=" return confirmdeletejob();"  title="<?php echo JText::_('JS_DELETE'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/delete.png" /></a>
                                            &nbsp;&nbsp;&nbsp;
                                            <?php if ($job->status == '0') {?>
                                                    <?php echo '<span class="jobstatusmsg">'.JText::_('JS_STATUS') .' : ' . JText::_('JS_APPROVALWAITING').'</span>'; ?>
                                            <?php }elseif ($job->status == '-1') {?>
                                                    <?php echo '<span class="jobstatusmsg">'.JText::_('JS_STATUS') .' : ' . JText::_('JS_NOTAPPROVED').'</span>'; ?>
                                            <?php }elseif ($job->status == '1') {?>
                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&task=addtogoldjobs&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_ADD_TO_GOLD_JOBS'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/add_gold.png" /></a>
                                            &nbsp;&nbsp;&nbsp;
                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&task=addtofeaturedjobs&oi='.$job->id.'&Itemid='.$this->Itemid); ?>
                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_ADD_TO_FEATURED_JOBS'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/add_featured.png" /></a>
                                            &nbsp;&nbsp;&nbsp;
                                            <?php $link = JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=job_shortlistcandidates&bd='.$job->id.'&Itemid='.$this->Itemid); ?>
                                            <a href="<?php echo $link?>" class="" title="<?php echo JText::_('JS_SHORT_LIST_CANDIDATES'); ?>"><img width="17" height="17" src="components/com_wrecruit/images/shortlist.png" /></a>
                                            <?php } ?>
					</div>
                            <!--
                            <tr>
                                    <td></td><td></td>
                                    <td class="maintext" align="center">
                                            <?php// $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=view_job&vj=5&oi='.$job->id.'&Itemid='.$this->Itemid; ?>
                                            <a href="<?php //echo $link?>" class="pageLink"><strong><?php //echo JText::_('JS_VIEW'); ?></strong></a>
                                    &nbsp;&nbsp;</td>

                            </tr>
                            -->
                       </table></td> </tr>
                    <?php } ?>
                <?php	} ?>
                    </table>
   <?php } ?>
			<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
			<input type="hidden" name="task" value="deletejob" />
			<input type="hidden" id="id" name="id" value="" />
			<input type="hidden" name="boxchecked" value="0" />

	</form>

<form action="<?php echo JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=myjobs&Itemid='.$this->Itemid); ?>" method="post">
<table cellpadding="0" cellspacing="0" border="0" width="100%" >
    <tr>
        <td></td>
        <td >
            <?php
            echo $this->pagination->getPagesLinks();
            ?>
        </td>
    </tr>
    <tr>
        <td align="left">
            <?php echo JText::_('JS_DISPLAY_#'); ?>
            <?php
            echo $this->pagination->getLimitBox();
            ?>
        </td>
        <td align="right">
            <?php
            echo $this->pagination->getResultsCounter();
            ?>
        </td>
    </tr>
</table>
</form>	
<?php

} else{ // not allowed job posting
echo JText::_('JS_YOU_ARE_NOT_ALLOWED_TO_VIEW');
}	
}else{ // no result found in this category
	echo JText::_('JS_RESULT_NOT_FOUND');
}
}//ol
?>	
<div width="100%">
<?php 
if($this->config['fr_cr_txsh']) {
	echo 
	'<table width="100%" style="table-layout:fixed;">
		<tr><td height="15"></td></tr>
		<tr><td style="vertical-align:top;" align="center">'.$this->config['fr_cr_txa'].$this->config['fr_cr_txb'].'</td></tr>
	</table>';
}	
?>
</div>


